package com.jiayang.util.excel;

/**
 * @Author: OuyangChenglong
 * @Date 2020/8/10
 */

import com.jiayang.util.JYangFileUtil;

import java.io.*;

public class JYangExcelReader {

    public static JYangExcel openExcel(String filePath) throws IOException {
        JYangFileUtil.isFileExistThrowException(filePath);
        return new JYangExcel(new File(filePath).getCanonicalPath());
    }

    public static JYangExcel openExcel(File file) throws IOException {
        return new JYangExcel(file.getCanonicalPath());
    }

    public static JYangExcel openExcel(InputStream ins, JYangExcelFileType fileType) throws IOException {
        return new JYangExcel(ins, fileType);
    }

//    public static void main(String[] args) throws Exception {
//        SmartExcel smartExcel = openExcel(new FileInputStream(new File("F:/privilege.xlsx")), SmartExcelFileType.XLSX);
//        System.out.println(smartExcel.getSheetList());
//    }

}
